﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace HZYProject.Domain
{
    public class Exam
    {
        public Guid ExamID { get; set; }
        /// <summary>
        /// 考试标题
        /// </summary>
        [StringLength(50)]
        public string Title { get; set; }

        /// <summary>
        /// 关联课程
        /// </summary>
        public Guid CourseID { get; set; }

        /// <summary>
        /// 关联试卷
        /// </summary>
        public Guid TestPaperID { get; set; }

        /// <summary>
        /// 时长
        /// </summary>
        public int Duration { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 开考时间
        /// </summary>
        public DateTime StartTime { set; get; }
        /// <summary>
        /// 导航属性-所属课程
        /// </summary>
        public virtual Course Course { get; set; }
        /// <summary>
        /// 导航属性-所属试卷
        /// </summary>
        public virtual TestPaper TestPaper { get; set; }
        /// <summary>
        /// 导航属性-拥有的学生
        /// </summary>
        public virtual ICollection<Result> Results { get; set; }

    }
}
